﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../Content/js/angular1.2.13.js"></script>
</head>
<body ng-app="app" ng-controller="MyController">
    字符过滤{{['aaa','bbb','ccc','abc']|filter:'e'}}
    <hr />
    对象过滤:{{
        [
            {'name':'Air','City':'San Franecico','favorite food':'Pizza'},
            {'name':'Nate','City':'San Franecico','favorite food':'indian food'}
        ]|filter:{'favorite food':'Pizza'}
    }}
    <hr />
    自定义过滤函数:
    {{
     ['Air','Like','to','travel']|filter:isCapitalized
    }}
    <script>
        angular.module('app',[])
        .controller('MyController', function ($scope) {
            $scope.isCapitalized = function (str) {
                return str[0] == str[0].toUpperCase();
            }
        });
    </script>
    <hr/>
    Json To String:{{ {'name':'Ari','City':'SanFrancisco'}|json }}
</body>
</html>
